/*
 * @Author: silas 
 * @Date: 2021-03-17 14:46:16 
 * @Last Modified by: silas
 * @Last Modified time: 2021-03-26 16:14:17
 */

<template>
    <div>
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="在建工程" name="first">
                <tab1 ref="tab1"></tab1>
            </el-tab-pane>
            <el-tab-pane label="一级专业" name="second">
                <tab2 ref="tab2"></tab2>
            </el-tab-pane>
            <el-tab-pane label="记录列表" name="third">
                <tab3 ref="tab3"></tab3>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import prefixAPI from "@/api/prefixAPI";
import { getCookie } from "@/common/js/cookie";
import { getSessionStorage } from "@/common/js/storage";
import { $budgetAPI } from "@/api";
import FileSaver from "file-saver";
import XLSX from "xlsx";
import tab1 from "./use-tab1";
import tab2 from "./use-tab2";
import tab3 from "./use-tab3";
export default {
    name: "constructionUnit",
    components: {
        tab1,
        tab2,
        tab3,
    },
    data() {
        return {
            activeName: 'first'
        };
    },
    
    mounted() {
	  	this.$refs.tab1.init();
    },
    methods: {
        handleClick(tab, event) {
            var that = this;

            if (tab.name == "first") {
                that.$refs.tab1.init();
            }
            if (tab.name == "second") {
                that.$refs.tab2.init();
            }
             if (tab.name == "third") {
                that.$refs.tab3.init();
            }
        },
    },
};
</script>

<style lang="scss" scoped>
.compilationSummary {
    .formList {
        margin-top: 20px;
        padding-bottom: 20px;
    }
    .g-btn-wrapper {
        display: flex;
        .g-cell {
            flex: 1;
            button {
                padding: 7px 15px;
            }
        }
        .g-btns {
            text-align: right;
        }
    }
    .table-content {
        .table-header {
            display: flex;
            justify-content: space-between;

            .btn-right {
                display: flex;
            }

            .table-title {
                font-size: 14px;
                font-weight: bold;
                height: 30px;
                line-height: 30px;

                span {
                    display: inline-block;
                    width: 5px;
                    height: 5px;
                    background-color: #418ee9;
                    border-radius: 1000%;
                    overflow: hidden;
                    margin-right: 10px;
                    margin-bottom: 3px;
                }
            }
        }
    }
}
</style>
<style lang="scss">
.compilationSummary {
    .formList {
        .el-form-item {
            width: 22%;
        }
        .el-form-item:last-child {
            width: 32%;
            .el-form-item__content {
                width: 100%;
            }
        }
        .el-form-item.btnBox {
            margin-bottom: 0px;
            width: 18%;
            margin-right: 0;

            .el-form-item__content {
                display: flex;
            }
        }
    }
}
/deep/ .el-form-item--mini .el-form-item__content {
    line-height: 35px;
}
</style>
